#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "mygl/mygl.h"
#include <QtOpenGL>
#include "mygl/triangulo.h"
#include <iostream>
QTextStream cout(stderr);
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), ui(new Ui::MainWindowClass)
{
    ui->setupUi(this);
    m_glWidget = new MyGLWidget(this);
    ui->verticalLayout->addWidget(m_glWidget);
    connect( ui->butonref1 ,SIGNAL(clicked()),m_glWidget,SLOT(refinar1()));
    connect( ui->butonref2  ,SIGNAL(clicked()),m_glWidget,SLOT(refinar2()));
    connect( ui->butonsin1 ,SIGNAL(clicked()),m_glWidget,SLOT(sincronizar1()));
    connect( ui->butonsin2 ,SIGNAL(clicked()),m_glWidget,SLOT(sincronizar2()));
    connect( ui->butonseparar  ,SIGNAL(clicked()),m_glWidget,SLOT(separar()));
    connect( ui->butonunir,SIGNAL(clicked()),m_glWidget,SLOT(unir()));
   // setCentralWidget(m_glWidget);
}

MainWindow::~MainWindow()
{
    delete ui;
}
